package com.itgungnir.designpattern.mediator;

public class User {
	private String name;

	public User(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void sendMessage(ChatRoom chatRoom, String message) {
		System.out.println(name + "发出消息：" + message);
		chatRoom.operateMessage(new Message(this, message));
	}
}